home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / system / ffg202.zip / FFGUSAGE.FAQ < prev    next >
Text File  |  1995-05-13  |  11KB  |  345 lines

  1.         IDEAS FOR USING FFG AND OTHER FREQUENTLY ASKED QUESTIONS
  2.  
  3.   Q: How do I find a file whose name I can't remember but I know it had
  4.      "92" in the name or extension somewhere?
  5.  
  6.   A: ffg *:*92*
  7.  
  8.  
  9.   Q: How do I find a file whose name I can't remember but I know it had
  10.      the words "save this forever" somewhere in the file?"
  11.  
  12.   A: 1. ffg *:* /$"save this forever"
  13.  
  14.      or
  15.  
  16.      2. ffg *:* /$save=_this=_forever
  17.  
  18.  
  19.   Q: How do I find a file that I know has both 'tax' in the name and '92'
  20.      in the name, but I'm not sure of the order or whether part is in the
  21.      name extension?
  22.  
  23.   A: ffg *:*tax* *92*
  24.  
  25.  
  26.   Q: How to I find files that have info about both "Tom" and "Dick" (or
  27.      "Richard"), but nothing about "Harry"?
  28.  
  29.   A: ffg *:* /$Tom /$Dick,Richard /$=!Harry
  30.  
  31.  
  32.   Q: How can I find a file and then make it's directory the current
  33.      directory?
  34.  
  35.   A: ffg *:filename /g
  36.  
  37.  
  38.   Q: How do I find all files created or modify today without having to
  39.      specify today's date?  How can I make backup copies of only those
  40.      files?
  41.  
  42.   A: 1. ffg *:* /dT
  43.      2. ffg *:* /dT /e"BACKEM %n", where 'BACKEM' is your backup command.
  44.  
  45.  
  46.   Q: How can I find files that were modified during a certain period of
  47.      the day?
  48.  
  49.   A: ffg *:* /t8:00-17:00
  50.  
  51.  
  52.  
  53.   Q: How can a find all configuration files and compress them into an ZIP
  54.      file?
  55.  
  56.   A: 1. To create a list file, then compress the batch:
  57.  
  58.      ffg C:*c*[,n]f[i,]g* /x*.[exe,com,zip] /fp /fs! > c:\cfg\config.lst
  59.      pkzip CFGS.ZIP @config.lst
  60.  
  61.      2. or, to do it one file at a time:
  62.  
  63.      ffg C:*c*[,n]f[i,]g* /x*.[exe,com,zip] /e"PKZIP -u C:\CFGS.ZIP %n"
  64.  
  65.  
  66.   Q: I want to use FFG to find and back up all my configuration files,
  67.      but the NameMask is so long it makes me exceed the 128 character
  68.      limit for the DOS command line.  Is there any way to get around this
  69.      limit?
  70.  
  71.   A: Yes, two things can help.  First, you can put some of the parameters
  72.      in the FFGOPT environment variable.   It is probably better, though,
  73.      to put the FFG options in a text file all on the first line and then
  74.      redirect FFG input to be from that file.  For example, if you put
  75.      your options in a file named CONFIGS.FFG, then you would run FFG as
  76.      follows:
  77.  
  78.        FFG < configs.ffg
  79.  
  80.  
  81.   Q: How can I find all files with a certain extension and rename them to
  82.      have a different extension?
  83.  
  84.   A: 1. ffg *:*.old /e"REN %N %F.new"         -- will confirm each one
  85.      2. ffg *:*.old /e"!REN %N %F.new"        -- will do all w/o confirm
  86.  
  87.  
  88.   Q: How can I get a database inventory of all executable programs on my
  89.      computer?
  90.  
  91.   A: ffg *:*.[exe,com] /f, /fs! > C:\DATA\EXELIST.TXT
  92.  
  93.  
  94.   Q: How can I clean up my disk of all temporary and backup files?
  95.  
  96.   A: ffg *:*.[bk*,bak,tmp] /e"DEL %N"
  97.  
  98.  
  99.   Q: How can I delete all files that match a certain description, but
  100.      have an opportunity to confirm for each one whether or not to delete
  101.      it?
  102.  
  103.   A: ffg *:FileMask [Grouping Options] /e"DEL %N"
  104.  
  105.  
  106.   Q: How, in a batch file, can I determine of a directory exists?
  107.  
  108.   A: See "direxist.bat" in UTIL_BAT.ZIP.
  109.  
  110.  
  111.   Q: How can I go find a file in an archive and unarchive it?
  112.  
  113.   A: ffg *:filename /z. /e"UNARC %Z %N"   --where UNARC is your unarchive
  114.                                             utility such as PKUNZIP
  115.  
  116.  
  117.   Q: How can I delete all files that haven't been modified in the last 30
  118.      days?
  119.  
  120.   A: ffg *:* /d-30T /e"DEL %N"
  121.  
  122.  
  123.   Q: How can I audit a business computer for files that appear to be of a
  124.      personal nature?
  125.  
  126.   A: Search for suspicious file names, text contents, hidden files, files
  127.      in hidden directories etc.
  128.  
  129.  
  130.   Q: How can I make all hidden files read-only too?
  131.  
  132.   A: ffg *:* /ah /e"ATTRIB +R %N"
  133.  
  134.  
  135.   Q: How can I find all of my tax files?  doc files? help files?
  136.  
  137.   A: See examples in EXAMPLES.FFG and in DEMO_BAT.ZIP
  138.  
  139.  
  140.   Q: How can I go find a file and immediately edit it? view it? search it
  141.      for text?
  142.  
  143.   A: See GoEdit.bat, GoList.bat, GoFind.bat in GO_BAT.ZIP.
  144.  
  145.  
  146.   Q: How can I find all archiving programs and copy them onto a floppy
  147.      disk?
  148.  
  149.   A: ffg *:*[zip,arj,arc,lzh,zoo,pak]*.[exe,com,bat] /e"COPY %N A:"
  150.  
  151.  
  152.  
  153.   Q: How can I archive all files last modified in 1992?
  154.  
  155.   A: ffg *:* /d92 /fp /fs! > c:\1992\1992.lst
  156.      C:
  157.      cd \1992
  158.      pkzip 1992.ZIP @1992.lst
  159.  
  160.  
  161.   Q: How can I find a file that was just created a few minutes ago, when
  162.      I don't know its name?
  163.  
  164.   A: ffg *:* /dT /t5N-      -- for last 5 minutes (See also RECENT.BAT)
  165.  
  166.  
  167.   Q: How can I find all files that were installed by Windows 3.1, no
  168.      matter where they are on my computer?
  169.  
  170.   A: ffg *:* /d3/10/92 /t3:10
  171.  
  172.  
  173.   Q: How do I find all files that were last modified/created last weekend?
  174.  
  175.   A: ffg *:* /dSa,Su /d7t-1t
  176.  
  177.  
  178.   Q: How do I find out if there are files in hidden directories?
  179.  
  180.   A: ffg *:* /h.
  181.  
  182.  
  183.   Q: I have a various files with five letter names and no extensions
  184.      (XXXXX.). I want to rename only 1992 files so that they start with
  185.      the year and have my initials as the extension in the form
  186.      92-XXXXX.TGV.  How do I do it?
  187.  
  188.   A: ffg *:?????. /d92 /e"REN %N 92-%F.TGV"
  189.  
  190.  
  191.   Q: How can I change the date/time of a group of files? (needs a dating
  192.      utility)
  193.  
  194.   A: ffg *:FileMask [Grouping Options] /e"NEWDATE %N"
  195.  
  196.      -- where NEWDATE is the dating utility
  197.  
  198.  
  199.   Q: How to I copy, rename, delete, replace etc. a group of files, but
  200.      have an opportunity to verify the operation for each file?
  201.  
  202.   A: See VDELETE.BAT for an example, but all this requires is use of the
  203.      /e execute option, without using the '!' no-confirm option.
  204.  
  205.  
  206.   Q: How can I use FFG to build useful utilities
  207.  
  208.   A: See UTIL-BAT.ZIP
  209.  
  210.  
  211.   Q: I would prefer FFG to search all drives if I don't specify an
  212.      explicit drive, rather than search the current drive.  How can I get
  213.      FFG to work way?
  214.  
  215.   A: In the FFGOPT environment variable, include the option "/:_*".  If
  216.      you also want to include floppy drives in the search use the option
  217.      "/:_ab*" instead.
  218.  
  219.  
  220.   Q: My computer is connected to a network and sometimes I want to search
  221.      for a file on all drives but I don't want to waste time searching
  222.      network drives.   How do I use the "*:" all drives specifier but
  223.      exclude network drives?
  224.  
  225.   A: Configure FFG to skip network drives by setting the "/:!n" option in
  226.      FFGOPT environment variable as in:
  227.  
  228.        set FFGOPT=/:!n
  229.  
  230.  
  231.   Q: I have a CD-ROM drive in my computer.  I don't want to waste time
  232.      searching it when I use the '*' "all-drive" specifier.  Can I
  233.      configure FFG to avoid searching it?
  234.  
  235.   A: Yes.  First, you can explicitly exclude it by using a drive
  236.      specifier "*d:", where D: is CD-ROM drive.  To configure FFG to skip
  237.      CD-ROM drives, set the "/:!c" option in the FFGOPT environment
  238.      variable.
  239.  
  240.  
  241.   Q: I do I skip both network and CD-ROM drives when "*:" is used?
  242.  
  243.   A: set FFGOPT=/:!cn
  244.  
  245.  
  246.   Q: My computer is connected to a network and sometimes I want to search
  247.      for a file on all drives but I don't want to waste time searching
  248.      network drives that I can't create files on.  Is there a way to use
  249.      the "*:" all drives specifier but exclude these drives?
  250.  
  251.   A: Yes, you can explicitly define which drives should be searched when
  252.      *: is used by using the "/:" option.  Do this by setting the option
  253.      in the FFGOPT environment variable as in:
  254.  
  255.        set FFGOPT=/:*c-fz
  256.  
  257.      which will cause "CDEFZ" to be substituted for the '*' when it is
  258.      used in a DriveSpec.
  259.  
  260.  
  261.   Q: How can I make FFG available from a menu program or from Windows,
  262.      yet enter unique search parameters each time it is invoked?
  263.  
  264.   A: To run FFG from other than the DOS prompt, simply run FFG without
  265.      any parameters.  FFG will then prompt the user for
  266.      parameters/options.  In Windows, you can create a program manager
  267.      icon and enter FFG.EXE as the command.
  268.  
  269.  
  270.   Q: I recently modified my computer configuration such that the disk
  271.      drives are numbered differently.  For example, I need to find all
  272.      the files that refer to drive D: and fix them because drive D:
  273.      doesn't exist anymore or is now a different drive letter.  How do I
  274.      identify all the files that need to be changed?
  275.  
  276.   A: Use the FFG text-search feature (/$ option).  For example, to find
  277.      all batch files that refer to drive D: use the following:
  278.  
  279.        ffg *:*.bat /$D:
  280.  
  281.      But here is how FFG can really help make this task easier by calling
  282.      your editor for each found file to allow you to make the changes:
  283.  
  284.        ffg *:*.bat /$D: /e"edit %n"
  285.  
  286.      If you have a batch-oriented find-and-replace utility you could also
  287.      use it with the /e option to make this chore even easier.
  288.  
  289.  
  290.   Q: I like FFG's text-search feature in conjuction with its ability to
  291.      limit the files searched based on date, size, name etc., but it
  292.      doesn't show me the text in the file as a utility like GREP would.
  293.      Any ideas on how to do this?
  294.  
  295.   A: See the included batch files GOLIST.BAT and GOGREP.BAT for ideas.
  296.      Here is an example using the utility LIST (or GREP). It searches all
  297.      .TXT and .BAT files last modified this year and no larger than 20K
  298.      for the text "happy days" and then lists the file:
  299.  
  300.        ffg *.[txt,bat] /dY /s-20K /$"happy days" /e"list %n"
  301.  
  302.   Q: Could I use FFG to scan files for a virus signature?
  303.  
  304.   A: Yes.  Use the /$ option to scan files for a signature (sequence of
  305.      bytes).  See the VIRUSCHT.BAT batch file for an example. Here is
  306.      basically what you would do to scan for the "KAOS4" virus which has
  307.      the signature "KAOS4" in the file:
  308.  
  309.        ffg *:*.[com,exe] /$=cKAOS4
  310.  
  311.   Q: My hard disk has some files with spaces in the name.  How can I find
  312.      all occurrences of these files?
  313.  
  314.   A: Use the following command line:
  315.  
  316.        ffg "* *"
  317.  
  318.      Note that the ASCII 255 character also appears as a blank space, so
  319.      if you are interested in finding those you can use the following
  320.      command:
  321.  
  322.        ffg * *
  323.  
  324.      where the "blank" is actually a 255 character that was entered by
  325.      pressing and holding the <ALT> key and pressing 255 on the numeric
  326.      keypad, then releasing the <ALT> key.  Here quotes are unecessary
  327.      because the 255 character is not a space, which is what makes the
  328.      quotes necesary for the first example.
  329.  
  330.   Q: How do I print FFG output?
  331.  
  332.   A: The simplest way is to simply redirect FFG output to the printer
  333.      directly as in the following example:
  334.  
  335.        ffg c:*.bat > prn
  336.  
  337.      However, there is no formatting using this method.  Therefore, it is
  338.      recommended that you redirect the output to a file and then use an
  339.      editor or wordprocessor to print the file.  You redirect the output
  340.      to a file as in the following example:
  341.  
  342.        ffg c:*.bat > OUTPUT.FFG
  343.  
  344.      where "OUTPUT.FFG" is the name of the file.
  345.